﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Web;

namespace Project_Udrinkwater
{

    public class CheckdataEmp
    {
        string Connection = ConfigurationManager.ConnectionStrings["DB_Udrink"].ConnectionString;

        public DataTable GetData(string U, string P)
        {
            DataTable dt = new DataTable();
            string sqltext = "SELECT * FROM TB_Employee WHERE Employee_ID = '" + U + "' AND Password='"+P+"' ";
            SqlConnection sqlconn = new SqlConnection(Connection);
            SqlDataAdapter da = new SqlDataAdapter(sqltext, sqlconn);
            DataSet ds = new DataSet();
            da.Fill(ds);

            return ds.Tables[0];
        }
       
    }
}